x = 10
def test():
    global x #声明全局变量并修改
    x = 20

test()
print(x)